import { stringify } from 'qs';
import request from '@/utils/request';

export async function List(params) {
  return request(`/report/query`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function add(params) {
  return request(`/report/add`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function update(params) {
  return request(`/report/edit`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}
export async function remove(params) {
  return request(`/report/delete/${params.id}`, {
    method: 'POST',
    body: {
      ...params,
    },
  });
}

export async function uploadFile(params) {
  return request('/img/upload', {
    method: 'POST',
    headers: { 'Content-Type': 'multipart/form-data' },
    body: params,
  });
}

export async function status(params) {
  return request('/report/status/update', {
    method: 'POST',
    body: params,
  });
}

export async function Detail(params) {
  return request(`/report/detail/${params.id}`, {
    method: 'POST',
    body: {},
  });
}
